<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title></title>
	<link rel="stylesheet" href="zhucedenglu.css" type="text/css">
	<script src="jquery.min.js"></script>
	<script src="jquery.validate.min.js"></script>
	<script src="localstorge.js"></script>
</head>
<body>
<div id="mask">
	<table name="login" align="center">
		<div class="drog">
			<h2 align="center">
				欢迎您！
			</h2>
			<form id="formId">
				<p align="center">
					用户名:<input type="text" id="username" name="username"/>
				</p>
				<p align="center">
					密&emsp;码:<input type="password" id="password" name="password"/>
				</p>
			</form>
			<p align="center">
				<button id="login" >登录</button>
			</p>
			<p align="center">
				还没有账号？<a href="2regiest.html">立即注册</a>
			</p>
		</div>
	</table>
</div>

<script>
	$(function(){
		$("#formId").validate({
			rules:{
				username:{
					required:true,
					checkUsername:true
				},
				password:{
					required:true,
					rangelength:[6,8]
				}

			},
			messages:{
				username:{
					required:"用户名不能为空",
					checkUsername:"用户名已存在"
				},
				password:{
					required:"密码不能为空",
					rangelength:"至少输入6个字符,但是不超过8个字符",
					digits:true
				},


			}

		});

	});
</script>


<script>
	localstorge()
</script>

</body>
</html>



